package day01_homework;

public class Test04 {
    public static void main(String[] args) {
        String fileName = "a.png";
        String fileName2 = "a.jpg";
        boolean check = fileName.endsWith(".png");
        if (check) {
            System.out.println("是png格式的图片");
        } else {
            System.out.println("不是png格式的图片");
        }
    }
}
